package com.winning.bdu.dl.mapper;

import com.winning.bdu.dl.entity.dto.BduKafkaMsg;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: shipengfei
 * @Description:
 * @Date: 2019-05-22 16:56
 */
@Mapper
public interface BduKafkaMsgMapper {

    /**
     * 数据消息表保存
     *
     * @param bduKafkaMsg
     */
    void insertTableData(@Param("bduKafkaMsg") BduKafkaMsg bduKafkaMsg);

    /**
     * 获取所有待处理的表
     *
     * @return
     */
    List<String> queryTableList();

    /**
     * 根据表名获取待处理的记录
     *
     * @param tableName
     * @return
     */
    List<BduKafkaMsg> queryDataMsgByTable(@Param("tableName") String tableName);

    /**
     * 处理状态更新
     *
     * @param kafkid
     * @param status
     */
    void updateStatus(@Param("kafkid") String kafkid, @Param("status") String status);
}
